package com.example.module_notice.ui.model

class AnnouncementEntity : ArrayList<AnnouncementEntityItem>()

data class AnnouncementEntityItem(
    val content: String,
    val id: Int,
    val publishTime: String,
    var status: String,
    val title: String,
    val type: String,
    val userId: Int
){
    fun notice_title():String{
        return if(title.isNullOrEmpty() ||  title==""){
            "***"
        }else{
            title
        }
    }
    fun notice_status():String{
        return if(status.isNullOrEmpty() ||  status==""){
            "未阅读"
        }else{
            status
        }
    }
    fun notice_type():String{
        return if(type.isNullOrEmpty() ||  type==""){
            "安全"
        }else{
            type
        }
    }
    fun notice_content():String{
        return if(content.isNullOrEmpty() ||  content==""){
            "用户很懒什么都没留下"
        }else{
            content
        }
    }
}